package com.feiyue.hikari.controller;

import com.feiyue.hikari.modle.User;
import com.feiyue.hikari.service.UserService;
import com.feiyue.hikari.utils.ResponInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Author: 86185
 * Date: 2019/9/13
 * Time: 11:01
 * Description: No Description
 */
@RestController
@Slf4j
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/user/{account}")
    public ResponInfo getById(@PathVariable String account) {
        log.info("account={}",account);
        return userService.getById(account);
    }


}
